package Views
{	
	import Player.SnakeHead;
	
	import mx.core.UIComponent;

	public class Field extends UIComponent
	{
		private var snakes:Array = new Array();
		
		public function Field(width:Number = 800, height:Number = 500)
		{
			this.width = width;
			this.height = height;
			
			emptyField();
		}
		
		/**
		 * Function to add snake displays to field
		 */
		public function addSnake(snake:SnakeView):void{
			snakes.push(snake);
			addChild(snake);
		}
		
		public function emptyField():void{
			graphics.clear();
			graphics.beginFill(0x0000);
			graphics.drawRect(0,0,width,height);
			graphics.endFill();
		}
	}
}